package com.ciaojian.client.controller;

import com.ciaojian.core.model.OrderReceiptAddress;
import com.ciaojian.core.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author oxiny
 */
@Api(tags = "订单模块: 收货地址")
@Validated
@RestController
@RequestMapping("/order/receipt-address")
public class OrderReceiptAddressController {

    @ApiOperation("新增订单收货地址")
    @PostMapping
    public Result create(@RequestBody @Validated OrderReceiptAddress orderReceiptAddress) {
        return Result.ok(orderReceiptAddress.insert());
    }
}
